const Router = require("koa-router");
const router = new Router({ prefix: "/components" });
const jwt = require("koa-jwt");
const { secret } = require("../config");
const auth = jwt({ secret });

const { get, all, create, modify, remove } = require("../controllers/components");

router.get("/list", get);
router.get("/all", all);
router.post("/create", create);
router.put("/edit", modify);
router.delete("/delete/:id", remove);

module.exports = router;
